@charset: 'utf-8';
body {
	padding: 0;
	margin: 0;
	background-color: #fff;
}
.container {
	margin: 100px auto 0 auto;
	text-align: center;
}
input[type="checkbox"] {
	display: none;
}
.checkbox {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-o-box-sizing: border-box;
	box-sizing: border-box;
	display: inline-block;
	width: 100px;
	height: 100px;
	border: 10px solid #ddd;
	border-radius: 5px;
	-webkit-transition: all .15s ease;
	-moz-transition: all .15s ease;
	-o-transition: all .15s ease;
	transition: all .15s ease;
	position: relative;
}
.checkbox:before,
.checkbox:after {
	content: ' ';
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	-o-box-sizing: border-box;
	box-sizing: border-box;
	display: inline-block;
	width: 15px;
	height: 0;
	background-color: #237ff8;
	-webkit-transform-origin: left top;
	-moz-transform-origin: left top;
	-o-transform-origin: left top;
	transform-origin: left top;
	position: absolute;
}
.checkbox:before {	
	border-radius: 5px;	
	-webkit-transform: rotate(-45deg);
	-moz-transform: rotate(-45deg);
	-o-transform: rotate(-45deg);
	transform: rotate(-45deg);	
	top: 30px;
	left: 5px;
	z-index: 2;
}
.checkbox:after {
	border-radius: 0 5px 5px 5px;
	box-shadow: 0 0 0 5px #fff;
	-webkit-transform: rotate(-135deg);
	-moz-transform: rotate(-135deg);
	-o-transform: rotate(-135deg);
	transform: rotate(-135deg);
	top: 54px;
	left: 44px;
	z-index: 1;
}
input[type="checkbox"]:checked + .checkbox {
	border-color: #237ff8;
}
input[type="checkbox"]:checked + .checkbox:before {
	-webkit-animation: tobottom .2s ease 0s forwards;
	-moz-animation: tobottom .2s ease 0s forwards;
	-o-animation: tobottom .2s ease 0s forwards;	
	animation: tobottom .2s ease 0s forwards;
}
input[type="checkbox"]:checked + .checkbox:after {
	-moz-animation: totop .4s ease 0s forwards;
	-o-animation: totop .4s ease 0s forwards;
	-webkit-animation: totop .4s ease 0s forwards;
	animation: totop .4s ease 0s forwards;
}

/* 打勾向下部分的动画 */
@-webkit-keyframes tobottom {
	0% { height: 0; } 
	100% { height: 45px; }
}
@-moz-keyframes tobottom {
	0% { height: 0; } 
	100% { height: 45px; }
}
@-o-keyframes tobottom {
	0% { height: 0; } 
	100% { height: 45px; }
}
@keyframes tobottom {
	0% { height: 0; } 
	100% { height: 45px; }
}

/* 打勾向上部分的动画 */
@-webkit-keyframes totop {
	0% { height: 0; } 
	50% { height: 0; }
	100% { height: 110px; }
}
@-moz-keyframes totop {
	0% { height: 0; } 
	50% { height: 0; }
	100% { height: 110px; }
}
@-o-keyframes totop {
	0% { height: 0; } 
	50% { height: 0; }
	100% { height: 110px; }
}
@keyframes totop {
	0% { height: 0; } 
	50% { height: 0; }
	100% { height: 110px; }
}


